//
//  YSGPublishRuleView.swift
//  EyeVisionForPatients
//
//  Created by PMC on 2020/5/12.
//  Copyright © 2020 QDSG. All rights reserved.
//

import UIKit

class YSGPublishRuleView: UIView {

    @IBOutlet private weak var firstDot: UIView! {
        didSet {
            firstDot.layer.cornerRadius = firstDot.height / 2
        }
    }
    @IBOutlet private weak var secondDot: UIView! {
        didSet {
            secondDot.layer.cornerRadius = secondDot.height / 2
        }
    }
    @IBOutlet private weak var thirdDot: UIView! {
        didSet {
            thirdDot.layer.cornerRadius = thirdDot.height / 2
        }
    }
    
    @IBOutlet private weak var firstLabel: UILabel!
    @IBOutlet private weak var secondLabel: UILabel!
    @IBOutlet private weak var thirdLabel: UILabel!
    
    func configure(with type: YSGDiagnoseType) {
        switch type {
        case .advisory:
            firstLabel.numberOfLines = 0
            var text = "· 您需要如实填写自己的病情描述和过敏史等信息，并为信息的真实性负责\n"
            text += "· 如果医生在24小时内未接诊，我们会为您自动退款\n"
            text += "· 医生接诊后，咨询会在24小时后自动结束，请尽快提问\n"
            text += " \n"
            text += "· 就诊前一日18:00后不可取消，请提前安排时间\n"
            text += "· 就诊当天请提前登录APP报道，等待医生开启视频\n"
            text += "· 请如实填写病情描述和过敏史等信息，医生将提前参考准备"
            firstLabel.text = text
            secondLabel.text = ""//"如果医生在24小时内未接诊，我们会为您自动退款"
            thirdLabel.text = ""//"医生接诊后，咨询会在24小时后自动结束，请尽快提问"
        case .cloud:
            firstLabel.text = "· 请如实填写病情描述和过敏史等信息，医生将提前参考准备"
            secondLabel.text = "就诊当天请提前登陆APP报道，等待医生开启视频"
            thirdLabel.text = "就诊前一日18:00后不可取消，请提前安排时间"
        default: break
        }
    }
}
